﻿CREATE PROCEDURE [dbo].[proc_Order_Getlist_Track_KfCount]
	(
		@UserName nvarchar(50),
		@Stext nvarchar(50),
		@StartDate nvarchar(10),
		@EndDate nvarchar(10)
	)
AS
	Select Count(Id) From [Order]
	Where TrackKfAccount=@UserName
		and (Convert(nchar(10),TradeDate,120) between @StartDate and @EndDate)
		and (@Stext='' Or CusName like '%'+@Stext+'%') 
	RETURN
